import request from '@/utils/request'

// 创建用户积分记录
export function createUserIntegralRecord(data) {
  return request({
    url: '/marketing/user-integral-record/create',
    method: 'post',
    data: data
  })
}

// 更新用户积分记录
export function updateUserIntegralRecord(data) {
  return request({
    url: '/marketing/user-integral-record/update',
    method: 'put',
    data: data
  })
}

// 删除用户积分记录
export function deleteUserIntegralRecord(id) {
  return request({
    url: '/marketing/user-integral-record/delete?id=' + id,
    method: 'delete'
  })
}

// 获得用户积分记录
export function getUserIntegralRecord(id) {
  return request({
    url: '/marketing/user-integral-record/get?id=' + id,
    method: 'get'
  })
}

// 获得用户积分记录分页
export function getUserIntegralRecordPage(params) {
  return request({
    url: '/marketing/user-integral-record/page',
    method: 'get',
    params
  })
}
// 导出用户积分记录 Excel
export function exportUserIntegralRecordExcel(params) {
  return request({
    url: '/marketing/user-integral-record/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
